import request from '@/router/axios';

export function fetchList(query) {
  return request({
    url: '/app/appuser/page',
    method: 'get',
    params: query,
  });
}

// export function getDetail(userId) {
//   return request({
//     url: `/app/appuser/${userId}`,
//     method: 'get',
//   });
// }

export function editObj(data) {
  return request({
    url: '/app/appuser/modify/type',
    method: 'put',
    data,
  });
}

// 新增app用户
export function addObj(data) {
  return request({
    url: '/app/appuser',
    method: 'post',
    data,
  });
}

// 获取官方账号列表
export function getOfficialList(params) {
  return request({
    url: '/app/appuser/list/official',
    method: 'get',
    params,
  });
}

// 通过userId获取详情
export function getObj(userId) {
  return request({
    url: `/app/appuser/platform/${userId}`,
    method: 'get',
  });
}
